#include <stdio.h>
#include "main.h"

int main(void) {
	union View editor_settings = {{1, 12, ALIGN_LEFT, 0, 0, 0}};
	char opt;

	showSettings(&editor_settings.v_st);
	showMenu();
	while((opt = getchar()) != 'k') {
		switch(opt) {
			case 't' : changeFontType(&editor_settings.v_byte); break;
			case 'r' : changeFontSize(&editor_settings.v_byte); break;
			case 'w' : changeAlignment(&editor_settings.v_byte); break;
			case 'b' : setBold(&editor_settings.v_byte); break;
			case 'i' : setItalic(&editor_settings.v_byte); break;
			case 'u' : setUnderline(&editor_settings.v_byte); break;
		}
		while(getchar() != '\n')
			continue;
		showSettings(&editor_settings.v_st);
		showMenu();
	}
	return 0;
}
